import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import request from "./utils/request";

Vue.config.productionTip = false;

router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title;
  }
  next();
});

/*浏览器控制台输出对应的 编译模式*/
console.log(process.env.NODE_ENV);
/*浏览器控制台输出对应的接口base url*/
console.log(process.env.VUE_APP_REQUEST_BASE_URL);
console.log(request);
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount("#app");
